
from sqlalchemy.ext.declarative import declarative_base 
from sqlalchemy import Column, Integer, String ,DateTime, Boolean
from myScrapy.models.base_model import BaseModel
import datetime
import time

Base = declarative_base()

class CsdnModel(BaseModel, Base):
    __tablename__ = 'csdn'
    id = Column(Integer, primary_key = True)
    index = Column(Integer)
    name = Column(String(255))
    num = Column(Integer)
    hot = Column(String(255))
    status = Column(Integer, default = 1)
    created_at = Column(DateTime, default = datetime.datetime.fromtimestamp(time.time()))

    def __init__(self):
        super().__init__()
        pass